﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SqliteDAL.Migrations
{
    /// <inheritdoc />
    public partial class My040103 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_T_Projects_T_DataDictinarys_DilutionModeId",
                table: "T_Projects");

            migrationBuilder.DropForeignKey(
                name: "FK_T_Projects_T_DataDictinarys_ProjectPriorityId",
                table: "T_Projects");

            migrationBuilder.DropIndex(
                name: "IX_T_Projects_DilutionModeId",
                table: "T_Projects");

            migrationBuilder.DropIndex(
                name: "IX_T_Projects_ProjectPriorityId",
                table: "T_Projects");

            migrationBuilder.RenameColumn(
                name: "SampleSize",
                table: "T_Projects",
                newName: "SampleSizeTwo");

            migrationBuilder.RenameColumn(
                name: "ProjectPriorityId",
                table: "T_Projects",
                newName: "WashingSizeTwo");

            migrationBuilder.RenameColumn(
                name: "DilutionRatio",
                table: "T_Projects",
                newName: "WashingType");

            migrationBuilder.RenameColumn(
                name: "DilutionModeId",
                table: "T_Projects",
                newName: "WashingSizeOne");

            migrationBuilder.AddColumn<string>(
                name: "CleanAgent",
                table: "T_Projects",
                type: "TEXT",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<int>(
                name: "DelayTime",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "DilutionMode",
                table: "T_Projects",
                type: "TEXT",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "DilutionRatioOne",
                table: "T_Projects",
                type: "TEXT",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "DilutionRatioThree",
                table: "T_Projects",
                type: "TEXT",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "DilutionRatioTwo",
                table: "T_Projects",
                type: "TEXT",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<int>(
                name: "FillingTime",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "IncubatioOscillationFrequency",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "IncubatioOscillationTime",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "IncubationTemperature",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "IncubationTime",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<bool>(
                name: "IsTwoAddSample",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<bool>(
                name: "IsTwoWashing",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<bool>(
                name: "IsVibrate",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<int>(
                name: "MainWavelength",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "ProjectPriority",
                table: "T_Projects",
                type: "TEXT",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "ProjectType",
                table: "T_Projects",
                type: "TEXT",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<int>(
                name: "ReadOscillationFrequency",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "ReadOscillationTime",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "ReagentNameOne",
                table: "T_Projects",
                type: "TEXT",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "ReagentNameTwo",
                table: "T_Projects",
                type: "TEXT",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<int>(
                name: "ReagentSizeOne",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "ReagentSizeTwo",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "ReagentTypeOne",
                table: "T_Projects",
                type: "TEXT",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<int>(
                name: "ReagentTypeTwo",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "RestingTime",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<double>(
                name: "SampleSizeOne",
                table: "T_Projects",
                type: "REAL",
                nullable: false,
                defaultValue: 0.0);

            migrationBuilder.AddColumn<int>(
                name: "Subwavelength",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "SuctionTime",
                table: "T_Projects",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CleanAgent",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "DelayTime",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "DilutionMode",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "DilutionRatioOne",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "DilutionRatioThree",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "DilutionRatioTwo",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "FillingTime",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "IncubatioOscillationFrequency",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "IncubatioOscillationTime",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "IncubationTemperature",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "IncubationTime",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "IsTwoAddSample",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "IsTwoWashing",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "IsVibrate",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "MainWavelength",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "ProjectPriority",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "ProjectType",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "ReadOscillationFrequency",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "ReadOscillationTime",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "ReagentNameOne",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "ReagentNameTwo",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "ReagentSizeOne",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "ReagentSizeTwo",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "ReagentTypeOne",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "ReagentTypeTwo",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "RestingTime",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "SampleSizeOne",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "Subwavelength",
                table: "T_Projects");

            migrationBuilder.DropColumn(
                name: "SuctionTime",
                table: "T_Projects");

            migrationBuilder.RenameColumn(
                name: "WashingType",
                table: "T_Projects",
                newName: "DilutionRatio");

            migrationBuilder.RenameColumn(
                name: "WashingSizeTwo",
                table: "T_Projects",
                newName: "ProjectPriorityId");

            migrationBuilder.RenameColumn(
                name: "WashingSizeOne",
                table: "T_Projects",
                newName: "DilutionModeId");

            migrationBuilder.RenameColumn(
                name: "SampleSizeTwo",
                table: "T_Projects",
                newName: "SampleSize");

            migrationBuilder.CreateIndex(
                name: "IX_T_Projects_DilutionModeId",
                table: "T_Projects",
                column: "DilutionModeId");

            migrationBuilder.CreateIndex(
                name: "IX_T_Projects_ProjectPriorityId",
                table: "T_Projects",
                column: "ProjectPriorityId");

            migrationBuilder.AddForeignKey(
                name: "FK_T_Projects_T_DataDictinarys_DilutionModeId",
                table: "T_Projects",
                column: "DilutionModeId",
                principalTable: "T_DataDictinarys",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);

            migrationBuilder.AddForeignKey(
                name: "FK_T_Projects_T_DataDictinarys_ProjectPriorityId",
                table: "T_Projects",
                column: "ProjectPriorityId",
                principalTable: "T_DataDictinarys",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);
        }
    }
}
